﻿<Window x:Class="WpfWordsLearner.Views.TestSettingView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:models="clr-namespace:WpfWordsLearner.ViewModels"
        Title="Test setting" Height="200" Width="300" ResizeMode="NoResize" WindowStyle="ToolWindow">
	<Window.Resources>
		<!--<converter:StringToInt32Converter x:Key="stringToInt"/>-->
		<models:TestSettingViewModel x:Key="TestSettingVM"/>
	</Window.Resources>
	<Grid DataContext="{Binding Source={StaticResource TestSettingVM}}">
		<Grid.RowDefinitions>
			<RowDefinition />
			<RowDefinition />
			<RowDefinition />
		</Grid.RowDefinitions>
		<StackPanel DataContext="{Binding Path=TestSettings, Source={StaticResource TestSettingVM}}">
			<TextBlock Text="Words count:"/>
			<TextBox Text="{Binding Path=WordsCount, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
		</StackPanel>
		<StackPanel Grid.Row="1" DataContext="{Binding Path=TestSettings, Source={StaticResource TestSettingVM}}">
			<TextBlock Text="Words scope:"/>
			<TextBox Text="{Binding Mode=TwoWay, Path=Scope, UpdateSourceTrigger=PropertyChanged}"/>
		</StackPanel>
		<StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
			<Button x:Name="btnProcced" Content="Proceed" Width="50" Height="30" Command="{Binding Path=ProceedCommand}"/>
			<Button x:Name="btnCancel" Content="Cancel" Width="50" Height="30" Command="{Binding Path=CancelCommand}"/>
		</StackPanel>
	</Grid>
</Window>
